home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / earthlink / nscomm / java40.jar / java / io / SHAOutputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-03  |  484 b   |  28 lines

  1. package java.io;
  2.  
  3. class SHAOutputStream extends OutputStream {
  4.    private int pctx;
  5.    private byte[] hash;
  6.  
  7.    public SHAOutputStream() {
  8.       this.reset();
  9.    }
  10.  
  11.    public void write(int var1) {
  12.       byte[] var2 = new byte[]{(byte)var1};
  13.       this.write(var2, 0, 1);
  14.    }
  15.  
  16.    public synchronized native void write(byte[] var1, int var2, int var3);
  17.  
  18.    public synchronized native void reset();
  19.  
  20.    public synchronized byte[] getHash() {
  21.       this.hash = new byte[20];
  22.       this.finish();
  23.       return this.hash;
  24.    }
  25.  
  26.    private native void finish();
  27. }
  28.